using UnityEngine;
using UnityEngine.UI;
using QFramework;
using UnityEngine.SceneManagement;
using ProjectSurvivor;

namespace QFrameworkSurvivor
{
	public class UIGamePassPanelData : UIPanelData
	{
	}
	public partial class UIGamePassPanel : UIPanel
	{
		protected override void OnInit(IUIData uiData = null)
		{
			mData = uiData as UIGamePassPanelData ?? new UIGamePassPanelData();
            Time.timeScale = 0;

			BtnBackToStart.onClick.AddListener(() => 
			{
                AudioKit.PlaySound("BtnClick");
                Time.timeScale = 1;
                this.CloseSelf();
				SceneManager.LoadScene("StartGame");
			});
            AudioKit.PlaySound("GamePass");
        }
		
		protected override void OnOpen(IUIData uiData = null)
		{
		}
		
		protected override void OnShow()
		{
		}
		
		protected override void OnHide()
		{
		}
		
		protected override void OnClose()
		{
            Time.timeScale = 1;
        }
	}
}
